Skip to content

Optimize get/set property access#4452

Merged
jedel1043 merged 8 commits intomainfrom
optimization/property-get-set
Nov 1, 2025
Merged

Optimize get/set property access#4452
jedel1043 merged 8 commits intomainfrom
optimization/property-get-set

Conversation

@HalidOdat
Copy link
Member

@HalidOdat HalidOdat commented Oct 2, 2025

It changes the following:

  • Prevent creation of temporary object on field access (i.e. "Hello".charCodeAt(1) creates 1 temporary String object for access to charCodeAt method through the prototype)
  • Specialize get and set property instructions
  • Add micro benchmark for object access

Benchmarks

main

PROGRESS Richards
RESULT Richards 180
PROGRESS DeltaBlue
RESULT DeltaBlue 181
PROGRESS Encrypt
PROGRESS Decrypt
RESULT Crypto 144
PROGRESS RayTrace
RESULT RayTrace 387
PROGRESS Earley
PROGRESS Boyer
RESULT EarleyBoyer 452
PROGRESS RegExp
RESULT RegExp 71.8
PROGRESS Splay
RESULT Splay 717
PROGRESS NavierStokes
RESULT NavierStokes 314
SCORE 246

PR

PROGRESS Richards
RESULT Richards 185
PROGRESS DeltaBlue
RESULT DeltaBlue 185
PROGRESS Encrypt
PROGRESS Decrypt
RESULT Crypto 143
PROGRESS RayTrace
RESULT RayTrace 401
PROGRESS Earley
PROGRESS Boyer
RESULT EarleyBoyer 464
PROGRESS RegExp
RESULT RegExp 70.4
PROGRESS Splay
RESULT Splay 736
PROGRESS NavierStokes
RESULT NavierStokes 323
SCORE 250

@HalidOdat HalidOdat changed the title Optimization/property get set Optimize get/set property access Oct 2, 2025
@HalidOdat HalidOdat added the A-Performance Performance related changes and issues label Oct 2, 2025
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

Test262 conformance changes

Test result main count PR count difference
Total 50,595 50,595 0
Passed 47,678 47,678 0
Ignored 2,036 2,036 0
Failed 881 881 0
Panics 0 0 0
Conformance 94.23% 94.23% 0.00%

@HalidOdat HalidOdat marked this pull request as ready for review October 5, 2025 13:26
@HalidOdat HalidOdat requested a review from a team October 5, 2025 13:29
@HalidOdat HalidOdat force-pushed the optimization/property-get-set branch from 252f08a to ded3ae5 Compare October 25, 2025 14:10
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly right, I just have a couple of comments.

@HalidOdat HalidOdat force-pushed the optimization/property-get-set branch from 47c5ea6 to 01b577a Compare October 31, 2025 22:52
@HalidOdat HalidOdat force-pushed the optimization/property-get-set branch from 01b577a to c243dfd Compare October 31, 2025 23:04
@HalidOdat HalidOdat requested a review from jedel1043 October 31, 2025 23:06
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@jedel1043 jedel1043 added this pull request to the merge queue Nov 1, 2025
Merged via the queue into main with commit da2b685 Nov 1, 2025
17 checks passed
@jedel1043 jedel1043 deleted the optimization/property-get-set branch November 1, 2025 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Performance Performance related changes and issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants